﻿using System.Windows;
using CommunityToolkit.Mvvm.Input;
using System.Windows.Input;

namespace LaserMark.ViewModels
{
    public class InitViewModel
    {
        public void Exit(object? o)
        {
            if (o is Window window)
            {
                window.WindowState = WindowState.Normal;
                window.Activate();
                window.Show();
                window.ShowInTaskbar = true;
            }
        }

        private RelayCommand<object>? exitCommond;
        public ICommand ExitCommond => exitCommond ??= new RelayCommand<object>(o => Exit(o));
    }
}
